package com.endpoint.author.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.endpoint.author.entity.Author;
import com.baomidou.mybatisplus.extension.service.IService;
import com.endpoint.author.to.BookIndexTo;
import com.endpoint.author.to.BookTo;
import com.endpoint.author.vo.AuthorVo;
import com.endpoint.author.vo.BookAddVo;
import com.endpoint.author.vo.ChapterAddVo;
import com.endpoint.common.utils.ResultBean;

/**
 * <p>
 * 作者表 服务类
 * </p>
 *
 * @author Jack_Li
 * @since 2024-07-03
 */
public interface AuthorService extends IService<Author> {

    public ResultBean<Integer> getAuthorStatus(Long userId);

    public ResultBean<Void> register(AuthorVo authorVo);

    public ResultBean<Page<BookTo>> listBooks(int pageNum, int pageSize, Long userId);

    public ResultBean<Void> saveBook(BookAddVo vo, String token);

    public ResultBean<Void> saveBookChapter(Long bookId, ChapterAddVo vo, Long userId);

    public ResultBean<Page<BookIndexTo>> listChapters(int pageNum, int pageSize, Long bookId);

}
